package servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import entity.Department;
import service.DepartmentService;
import serviceImpl.DepartmentServiceImpl;
/**
 * 
 */
public class EmployeeAddJumpServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	DepartmentService  departmentService=new DepartmentServiceImpl();
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		List<Department> list = departmentService.getDepartmentList();
		
		request.setAttribute("deptList", list);
		
		request.getRequestDispatcher("/employee_add.jsp").forward(request, response);
	}

}
